<%@ page language="java" import="java.util.*,dao.*,entity.User" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%
	UserDao dao = new UserDao();
	ArrayList<User> userList = dao.getUsers("");
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../css/within.css" />
</head>
<body>
	<div class="searchcondition">
		<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="top"><a href="javascript:void(0);" onclick="fold('fold1',this);" style="background:url('../img/ss.gif') no-repeat 5px 5px"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Queery User</strong></a></td>
		</tr>
		<tr>
			<td>
				<div id="fold1" style="display:block;">
					<div>
						<table class="content" cellpadding="0" cellspacing="0">
							<tr>
								<td class="caption">User Name</td><td class="info"><input class="inputText" name="name" value=""/></td>
								<td class="caption">Email</td><td class="info"><input  class="inputText" name="name" value=""/></td>
							</tr>
							<tr>
								<td class="caption">User Type</td><td class="info"><select><option>--Please Select--</option></select></td>
								<td class="caption">User Statue</td><td class="info"><select><option>--Please Select--</option></select></td>
							</tr>
						</table>
					</div>
				</div>
			</td>
		</tr>
	</table>
	</div>
	<div class="refer-button">
		<input type="button" class="btnall" value="Query"/>
		<input type="button" class="btnall" value="Add New"/>
	</div>

	<div class="outcomediv">
		<div>
			<table class="gdtable" cellpadding="0" cellspacing="0">
				<tr>
					<th>UserID</th><th>UserName</th><th>UserType</th><th>Email</th><th>Phone</th>
				</tr>
				<%
					for (int i = 0; i < userList.size(); i++) {
						User user = (User) userList.get(i);	%>
				<tr>
					<td><%=user.getUserId() %></td>
					<td><%=user.getUserName() %></td>
					<td><%=user.getUserType() %></td>
					<td><%=user.getEmail() %></td>
					<td><%=user.getPhone() %></td>
				</tr>
				<%} %>
			</table>
		</div>
		<div class="gdtablebottom">
			<ul>
				<li>total 20 records</li><li>page 1/3</li><li><a><img src="../img/page_first_a.gif" /></a></li><li><a><img src="../img/page_pre_a.gif" /></a></li><li><a><img src="../img/page_next_a.gif" /></a></li><li><a><img src="../img/page_last_a.gif" /></a></li><li>10 records/page</li>
			</ul>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
function fold(elem,aaa){
		var elemThis = document.getElementById(elem);
		if(elemThis.style.display=='none'){
			elemThis.style.display='block'
			aaa.style.background='url("../img/ss.gif") no-repeat 5px 5px ';
		}
		else{
			elemThis.style.display='none'
			aaa.style.background='url("../img/zk.gif") no-repeat 5px 5px ';

		}
	}

</script>